<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/15 0015
 * Time: 9:45
 */

namespace Cohuna\Models;
use Phalcon\Di;

/**
 * 退款记录表
 * @package Cohuna\Models
 */
class CohunaRefundRecords extends ModelBase
{
    public $refund_id;
    public $order_no;
    public $merchant_id;
    public $refund_no;
    public $transaction_id;
    public $out_transaction_id;
    public $refund_amount;
    public $refund_reason;
    public $refund_fee;
    public $refund_status;
    public $refund_from;
    public $refund_way;
    public $refund_request_time;
    public $refund_success_time;
    public $refund_complete_time;


    public function getSource()
    {
        return Di::getDefault()->getShared('config')->datablse->default->prefix . 'refund_records';
    }

    public function beforeUpdate()
    {

    }
    public function beforeCreate()
    {
        $this->refund_request_time = date('Y-m-d H:i:s');
    }

}